<?php /* Smarty version Smarty-3.1.13, created on 2013-08-20 19:42:11
         compiled from "C:\xampp\htdocs\codigogm\application\view\agenda\index.tpl" */ ?>
<?php /*%%SmartyHeaderCode:1967651f96f62f333b8-49397363%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '3a432791a51ee0c3ac839bfcce227f8aa7c58df0' => 
    array (
      0 => 'C:\\xampp\\htdocs\\codigogm\\application\\view\\agenda\\index.tpl',
      1 => 1377020498,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1967651f96f62f333b8-49397363',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_51f96f630746c7_77452503',
  'variables' => 
  array (
    'header' => 0,
    'titlePage' => 0,
    'lista' => 0,
    'row' => 0,
    'msgDelete' => 0,
    'msgLogin' => 0,
    'footer' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_51f96f630746c7_77452503')) {function content_51f96f630746c7_77452503($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ($_smarty_tpl->tpl_vars['header']->value, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<div id="content">
<?php if ($_SESSION['logged']==1){?>
 <h1><?php echo $_smarty_tpl->tpl_vars['titlePage']->value;?>
<?php echo $_SESSION['user'];?>
</h1>
  <a href="<?php echo @constant('AGENDA');?>
/insert">Novo Contato</a>
  <table>
  	<tr>
     <th>Nome</th>
     <th>Celular</th>
     <th>Email</th>
     <th>Ações</th>
    </tr>
<?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['lista']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['row']->key => $_smarty_tpl->tpl_vars['row']->value){
$_smarty_tpl->tpl_vars['row']->_loop = true;
?>  
    <tr>
     <td><a href="<?php echo @constant('AGENDA');?>
/perfil/<?php echo $_smarty_tpl->tpl_vars['row']->value['id_contact'];?>
"><?php echo $_smarty_tpl->tpl_vars['row']->value['name'];?>
</a></td>
     <td><?php echo $_smarty_tpl->tpl_vars['row']->value['cel'];?>
</td>
     <td><?php echo $_smarty_tpl->tpl_vars['row']->value['email'];?>
</td>
     <td>
      <a href="<?php echo @constant('AGENDA');?>
/edit/<?php echo $_smarty_tpl->tpl_vars['row']->value['id_contact'];?>
">Edit</a> |
      <a href="<?php echo @constant('AGENDA');?>
/delete/<?php echo $_smarty_tpl->tpl_vars['row']->value['id_contact'];?>
">Delete</a>
     </td>
    </tr>
<?php } ?>    
  </table>
  <p><?php echo $_smarty_tpl->tpl_vars['msgDelete']->value;?>
</p>
<?php }else{ ?>
<p><?php echo $_smarty_tpl->tpl_vars['msgLogin']->value;?>
</p>
<?php }?> 
<?php echo $_smarty_tpl->getSubTemplate ($_smarty_tpl->tpl_vars['footer']->value, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
<?php }} ?>